﻿@model com.fmtx.Model.Place
@{
    ViewBag.Title = "Edit";
}

<form class="form-horizontal">
        <fieldset>
          <legend>景点编辑</legend>
          <div class="control-group">
            <label class="control-label" for="focusedInput">名称</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.Name, new {@class="input-xlarge focused" })
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.Name)</span>
            </div>
          </div>
            <div class="control-group">
            <label class="control-label" for="focusedInput">英文名</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.EnName, new {@class="input-xlarge" })
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.EnName)</span>
            </div>
          </div>
            <div class="control-group">
            <label class="control-label" for="focusedInput">拼音</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.PingYin, new {@class="input-xlarge" })
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.PingYin)</span>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label">城市</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.CityName, new {@class="input-xlarge" })
                @Html.HiddenFor(m=>m.CityId)
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.CityName)</span>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="disabledInput">经纬度</label>
            <div class="controls">
             lat: @Html.TextBoxFor(m => m.Lat, new {@class="span2" }) lng:@Html.TextBoxFor(m => m.Lng, new {@class="span2" })
                <button type="button" ><i class="icon-map-marker"></i></button>
            </div>
          </div>
           <div class="control-group">
            <label class="control-label" for="optionsCheckbox2">封面</label>
            <div class="controls">
              <img width="50" src="@StaticCs.ImageUrl/img/artwork?file=@Model.Pic" /> <input type="file" id="filepic" name="filepic" />
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="inputWarning">简介</label>
            <div class="controls">
              @Html.TextAreaFor(m=>m.Summary,new {@class="input-xlarge",style="width:40%;height:60px;" })
              <span class="help-inline">@Html.ValidationMessageFor(m=>m.Summary)</span>
            </div>
          </div>
          <div class="form-actions">
            <button type="submit" class="btn btn-primary">保存更改</button>
            <a href="/admin/place/" class="btn">取消</a>
          </div>
        </fieldset>
      </form>
@section scripts{
    @Scripts.Render("~/js/jqueryval")
<script type="text/javascript">
    $("input[name=CityName]").fmtxDropdown({ url: "/action/area/CityBykey", value: "CityId" });
</script>
    }